﻿//        Another Demo from Andy L. & MissedMemo.com
// Borrow whatever code seems useful - just don't try to hold
// me responsible for any ill effects. My demos sometimes use
// licensed images which CANNOT legally be copied and reused.

using System.Windows.Data;

using MissedMemo.MeatAndCheeseDisc.OrderEntryService.OrderProcessing;


namespace MissedMemo.MeatAndCheeseDisc.OrderEntry
{
    public class OrderStateToCheckEnabledConverter : IValueConverter
    {
        public object Convert( object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture )
        {
            ProcessingState state = (ProcessingState)value;

            return state == ProcessingState.Ready
                || state == ProcessingState.OutForDelivery
                || state == ProcessingState.Completed;
        }


        public object ConvertBack( object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture )
        {
            throw new System.NotImplementedException();
        }
    }
}
